package kr.saeildamil.androidforstudy2.ch33;

import kr.saeildamil.androidforstudy2.R;
import android.app.Activity;
import android.os.Bundle;
import android.os.Environment;
import android.widget.MediaController;
import android.widget.VideoView;

public class ViewVideo extends Activity {
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.ch33_viewvideo);
		
		VideoView video = (VideoView) findViewById(R.id.videoView1);
		String sdpath = Environment.getExternalStorageDirectory().getAbsolutePath();
		video.setVideoPath(sdpath + "/media/DNF/newtrial.wmv");
		
		final MediaController controller = new MediaController(ViewVideo.this);
		video.setMediaController(controller);
		video.postDelayed(new Runnable() {
			
			@Override
			public void run() {
				controller.show();
			}
		}, 100);
		
	}

}
